At present, the near field communication method is widely adopted in various fields (e.g. payment), and the communication between device A and device B that uses the near field communication method (e.g. RFID, NFC, infrared or Bluetooth) may have safety hazards. For example, as illustrated in FIG. 1, if the data channel established by device A and device B is intervened by a third party, the data during the entire communication process arrives at the other device through a third party without the knowledge of both rightful parties, eventually resulting in data leakage.